package models

import "gorm.io/gorm"

type Question struct {
	gorm.Model
	Title        string       `json:"title" gorm:"type:varchar(100)"`
	Author       string       `json:"author" gorm:"type:text"`
	Img          string       `json:"img" gorm:"type:varchar(255)"`
	CateId       uint         `gorm:"type:int(10)" json:"cate_id"`
	QuestionType QuestionType `gorm:"foreignKey:CateId"`
}

type QuestionType struct {
	gorm.Model
	Name string `json:"name" gorm:"type:varchar(100)"`
}
